#ifndef SETTINGDIALOG_H
#define SETTINGDIALOG_H

#include <QDialog>
#include <QRegExpValidator>

namespace Ui {
class SettingDialog;
}

class SettingDialog : public QDialog
{
    Q_OBJECT

public:
    //explicit SettingDialog(QWidget *parent = 0);
    explicit SettingDialog(QWidget *parent = 0, QString user = "root", QString ip="localhost", QString password="password",
                  QString log_file="/var/log/dhcp.conf");
    ~SettingDialog();
    QString get_ssh_user();
    QString get_ssh_ip();
    QString get_ssh_password();
    QString get_dhcp_log_file();
    bool can_be_load;

private slots:
    void on_savebutton_clicked();

    void on_cancelbutton_clicked();

    void on_browsebutton_clicked();

private:
    Ui::SettingDialog *ui;
    QString ssh_ip;
    QString ssh_user;
    QString ssh_password;
    QString dhcp_log_file;
    //QRegularExpression* ipRegex;
    QValidator *ipValidator;
};

#endif // SETTINGDIALOG_H
